<?php class Alumno_horario_escuela { 

    /***
     * DB Fields: id_alumno
     *
     *
     * THIS IS a generated method using the DBClassGenerator 
     * created by John paul de Guzman <jpdguzman@gmail.com> 
     *
     **/
    var $id_alumno;

    /***
     * DB Fields: id_horario
     *
     *
     * THIS IS a generated method using the DBClassGenerator 
     * created by John paul de Guzman <jpdguzman@gmail.com> 
     *
     **/
    var $id_horario;

    /***
     * DB Fields: id_escuela
     *
     *
     * THIS IS a generated method using the DBClassGenerator 
     * created by John paul de Guzman <jpdguzman@gmail.com> 
     *
     **/
    var $id_escuela;

    /***
     * DB Fields: fecha_registro
     *
     *
     * THIS IS a generated method using the DBClassGenerator 
     * created by John paul de Guzman <jpdguzman@gmail.com> 
     *
     **/
    var $fecha_registro;

    /***
     * DB Fields: fecha_actualizacion
     *
     *
     * THIS IS a generated method using the DBClassGenerator 
     * created by John paul de Guzman <jpdguzman@gmail.com> 
     *
     **/
    var $fecha_actualizacion;

    /***
     * DB Fields: activo
     *
     *
     * THIS IS a generated method using the DBClassGenerator 
     * created by John paul de Guzman <jpdguzman@gmail.com> 
     *
     **/
    var $activo;

//--------------- GET METHODS ----------------------------- //
    /***
     * Get value for field: id_alumno
     *
     *
     * THIS IS a generated method using the DBClassGenerator 
     * created by John paul de Guzman <jpdguzman@gmail.com> 
     *
     * @result id_alumno
     **/
    function get_id_alumno( ) {
        // returns the value of id_alumno
        return $this->id_alumno;
    }


    /***
     * Get value for field: id_horario
     *
     *
     * THIS IS a generated method using the DBClassGenerator 
     * created by John paul de Guzman <jpdguzman@gmail.com> 
     *
     * @result id_horario
     **/
    function get_id_horario( ) {
        // returns the value of id_horario
        return $this->id_horario;
    }


    /***
     * Get value for field: id_escuela
     *
     *
     * THIS IS a generated method using the DBClassGenerator 
     * created by John paul de Guzman <jpdguzman@gmail.com> 
     *
     * @result id_escuela
     **/
    function get_id_escuela( ) {
        // returns the value of id_escuela
        return $this->id_escuela;
    }


    /***
     * Get value for field: fecha_registro
     *
     *
     * THIS IS a generated method using the DBClassGenerator 
     * created by John paul de Guzman <jpdguzman@gmail.com> 
     *
     * @result fecha_registro
     **/
    function get_fecha_registro( ) {
        // returns the value of fecha_registro
        return $this->fecha_registro;
    }


    /***
     * Get value for field: fecha_actualizacion
     *
     *
     * THIS IS a generated method using the DBClassGenerator 
     * created by John paul de Guzman <jpdguzman@gmail.com> 
     *
     * @result fecha_actualizacion
     **/
    function get_fecha_actualizacion( ) {
        // returns the value of fecha_actualizacion
        return $this->fecha_actualizacion;
    }


    /***
     * Get value for field: activo
     *
     *
     * THIS IS a generated method using the DBClassGenerator 
     * created by John paul de Guzman <jpdguzman@gmail.com> 
     *
     * @result activo
     **/
    function get_activo( ) {
        // returns the value of activo
        return $this->activo;
    }


//--------------- SET METHODS ----------------------------- //
    /***
     * Set value for field: id_alumno
     *
     *
     * THIS IS a generated method using the DBClassGenerator 
     * created by John paul de Guzman <jpdguzman@gmail.com> 
     *
     * @param id_alumno
     * @result void
     **/
    function set_id_alumno( $id_alumno ) {
        // sets the value of id_alumno
        $this->id_alumno = $id_alumno;
    }

    /***
     * Set value for field: id_horario
     *
     *
     * THIS IS a generated method using the DBClassGenerator 
     * created by John paul de Guzman <jpdguzman@gmail.com> 
     *
     * @param id_horario
     * @result void
     **/
    function set_id_horario( $id_horario ) {
        // sets the value of id_horario
        $this->id_horario = $id_horario;
    }

    /***
     * Set value for field: id_escuela
     *
     *
     * THIS IS a generated method using the DBClassGenerator 
     * created by John paul de Guzman <jpdguzman@gmail.com> 
     *
     * @param id_escuela
     * @result void
     **/
    function set_id_escuela( $id_escuela ) {
        // sets the value of id_escuela
        $this->id_escuela = $id_escuela;
    }

    /***
     * Set value for field: fecha_registro
     *
     *
     * THIS IS a generated method using the DBClassGenerator 
     * created by John paul de Guzman <jpdguzman@gmail.com> 
     *
     * @param fecha_registro
     * @result void
     **/
    function set_fecha_registro( $fecha_registro ) {
        // sets the value of fecha_registro
        $this->fecha_registro = $fecha_registro;
    }

    /***
     * Set value for field: fecha_actualizacion
     *
     *
     * THIS IS a generated method using the DBClassGenerator 
     * created by John paul de Guzman <jpdguzman@gmail.com> 
     *
     * @param fecha_actualizacion
     * @result void
     **/
    function set_fecha_actualizacion( $fecha_actualizacion ) {
        // sets the value of fecha_actualizacion
        $this->fecha_actualizacion = $fecha_actualizacion;
    }

    /***
     * Set value for field: activo
     *
     *
     * THIS IS a generated method using the DBClassGenerator 
     * created by John paul de Guzman <jpdguzman@gmail.com> 
     *
     * @param activo
     * @result void
     **/
    function set_activo( $activo ) {
        // sets the value of activo
        $this->activo = $activo;
    }

//--------------- CRUD METHODS ----------------------------- //
    /***
     * Create a new Record: alumno_horario_escuela
     *
     *
     * THIS IS a generated method using the DBClassGenerator 
     * created by John paul de Guzman <jpdguzman@gmail.com> 
     *
     * @param id_alumno
     * @param id_horario
     * @param id_escuela
     * @param fecha_registro
     * @param fecha_actualizacion
     * @param activo
     * @result void
     **/
    function createnew_alumno_horario_escuela( $id_alumno, $id_horario, $id_escuela, $fecha_registro, $fecha_actualizacion, $activo ) {

        // items to be inserted in the database 
        $_obj = array($id_alumno,
                      $id_horario,
                      $id_escuela,
                      $fecha_registro,
                      $fecha_actualizacion,
                      $activo); 

        // database object connection
        $dbConn = $GLOBALS['dbConn'];

        // perform insert in the database
        $dbConn->insert("alumno_horario_escuela", $_obj);
    }

    /***
     * Retrived an existing record: alumno_horario_escuela
     *
     *
     * THIS IS a generated method using the DBClassGenerator 
     * created by John paul de Guzman <jpdguzman@gmail.com> 
     *
     * @param id_alumno
     * @result new Alumno_horario_escuela
     **/
    function get_alumno_horario_escuela( $id_alumno ) {

        // retrive the data
        $dbConn = $GLOBALS['dbConn'];

        // retrieved value in the database
        $_resultSet = $dbConn->doQuery("SELECT * FROM alumno_horario_escuela WHERE id_alumno = '$id_alumno'");

        $__alumno_horario_escuelaObj = new alumno_horario_escuela();
        // return the retrived from the database

        // create a new object
        $__obj = new Alumno_horario_escuela();
        $__obj->set_id_alumno($_resultSet[0]['id_alumno']);
        $__obj->set_id_horario($_resultSet[0]['id_horario']);
        $__obj->set_id_escuela($_resultSet[0]['id_escuela']);
        $__obj->set_fecha_registro($_resultSet[0]['fecha_registro']);
        $__obj->set_fecha_actualizacion($_resultSet[0]['fecha_actualizacion']);
        $__obj->set_activo($_resultSet[0]['activo']);


        return $__obj;
    }

    /***
     * Update an existing record: alumno_horario_escuela
     *
     *
     * THIS IS a generated method using the DBClassGenerator 
     * created by John paul de Guzman <jpdguzman@gmail.com> 
     *
     * @param id_alumno
     * @param itemsToBeUpdated = array()
     * @result void
     **/
    function update_alumno_horario_escuela( $id_alumno, $itemsToBeUpdated = array() ) {

         // get database connection
         $dbConn = $GLOBALS['dbConn'];

         // performs update in the database
         foreach($itemsToBeUpdated as $_fName => $_fVal) { 
               $dbConn->addValuePair($_fName, $_fVal);
         }

         // perform update operation
         $dbConn->update("alumno_horario_escuela", "id_alumno = '$id_alumno'");
    }

    /***
     * Delete an existing record: alumno_horario_escuela
     *
     *
     * THIS IS a generated method using the DBClassGenerator 
     * created by John paul de Guzman <jpdguzman@gmail.com> 
     *
     * @param id_alumno
     * @result void
     **/
    function delete_alumno_horario_escuela( $id_alumno ) {

         // get database connection
         $dbConn = $GLOBALS['dbConn'];

         // performs deletion of data
         $dbConn->delete("alumno_horario_escuela", "id_alumno = '$id_alumno'");
    }

    /***
     * Retrived list of objects base on a given parameters: alumno_horario_escuela
     *
     *
     * THIS IS a generated method using the DBClassGenerator 
     * created by John paul de Guzman <jpdguzman@gmail.com> 
     *
     * @param conditionalStatement = ''
     * @result collection of objects: Alumno_horario_escuela
     **/
    function list_alumno_horario_escuela( $conditionalStatement = '' ) {

         $dbConn = $GLOBALS['dbConn'];
         // check if there is a given parameter list
         if(!empty($conditionalStatement)) { 
              $sqlStatement = "SELECT * FROM alumno_horario_escuela WHERE $conditionalStatement"; 
         } else { 
              $sqlStatement = "SELECT * FROM alumno_horario_escuela";
         }

         // retrieve the values base on the query result
         $__resObj = $dbConn->doQuery($sqlStatement);

         $__collectionOfObjects = array();
         foreach($__resObj as $__rs) { 
            $__newObj = new Alumno_horario_escuela();

            $__newObj->set_id_alumno($__rs['id_alumno']);
            $__newObj->set_id_horario($__rs['id_horario']);
            $__newObj->set_id_escuela($__rs['id_escuela']);
            $__newObj->set_fecha_registro($__rs['fecha_registro']);
            $__newObj->set_fecha_actualizacion($__rs['fecha_actualizacion']);
            $__newObj->set_activo($__rs['activo']);

            // add object to collection 
            array_push($__collectionOfObjects, $__newObj);
         }

         // return collection of objects
         return $__collectionOfObjects;
    }

} ?>